﻿using System;
using System.Linq;

    class PrintTheValueOfTheBit
    {
        static void Main(string[] args)
        {
            int i = 5;
            int b = 1;
            int mask = 1 << b;
            int iAndMask = i & mask;
            int valueOfBit = iAndMask >> b;
            Console.WriteLine("The value of the bit {0} is: {1} ", b, valueOfBit);
        }
    }

